<?php /*a:2:{s:65:"/Applications/MAMP/htdocs/application/index/view/index/index.html";i:1591464585;s:58:"/Applications/MAMP/htdocs/application/index/view/base.html";i:1591464705;}*/ ?>
<!doctype html>
<html lang="zn-en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="/../static/index/lib/css/bootstrap.css"  crossorigin="anonymous">
    <link rel="stylesheet" href="/../static/index/css/index.css">
    <link href="/../static/layui/css/layui.css" rel="stylesheet">
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"  crossorigin="anonymous"></script>
    <script src="/../static/index/lib/js/bootstrap.bundle.js" crossorigin="anonymous"></script>
    <script src="/../static/index/lib/js/bootstrap.js"  crossorigin="anonymous"></script>
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script type="text/javascript" src="/../static/layui/layui.all.js"></script>
    <title>首页</title>
</head>
<body>
<header class="header">
    <div class="logo">
        <div class="btitle d-inline-block p-1 pb-1">
            <img src="/../static/index/images/logo.png" alt="">
        </div>
        <div class="login">
            <i class="iconfont">&#xe7a5;</i>
            <?php if(empty(session('user_id'))): ?>
            <a href="<?php echo url('index/login/login'); ?>">登录</a>/<a href="<?php echo url('index/login/reg'); ?>">注册</a>
            <?php else: ?>
            <a href="<?php echo url('index/center/index'); ?>">个人中心</a>/ <a id="layout">退出</a>
            <?php endif; ?>

        </div>
    </div>

</header>
<nav>
    <ul>
        <li >
            <a class="" href="<?php echo url('index/index/index'); ?>">首页</a>
        </li>
        <li >
            <a class="" href="<?php echo url('index/article/index'); ?>">动态咨询</a>
        </li>
        <li >
            <a class="" href="<?php echo url('index/project/index'); ?>">视频课程</a>
        </li>
        <li >
            <a class="" href="<?php echo url('index/live/index'); ?>">在线直播</a>
        </li>
        <li>
            <a class="" href="<?php echo url('index/book/index'); ?>">图书商城</a>
        </li>
        <li>
            <a class="" href="<?php echo url('index/othvideo/index'); ?>">短视频专区</a>
        </li>
    </ul>
</nav>
<div class="main-content">

<div class="lunbo">
    <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators">
            <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
            <li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
            <li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
        </ol>
        <div class="carousel-inner">
            <div class="carousel-item active">
                <img src="/../static/index/images/banner1.png" class="d-block w-100" alt="...">
            </div>
            <div class="carousel-item">
                <img src="/../static/index/images/banner2.png" class="d-block w-100" alt="...">
            </div>
            <div class="carousel-item">
                <img src="/../static/index/images/banner3.png" class="d-block w-100" alt="...">
            </div>
        </div>
        <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
        </a>
        <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
        </a>
    </div>
</div>
<div class="project">
    <div class="p-title">
        <span>等级课程</span>
        <div class="p-more">
            <i class="iconfont">&#xe628;</i>
            <a href="<?php echo url('index/project/index'); ?>">更多</a>
        </div>
    </div>
    <div class="p-content">
        <?php foreach($proList as $v): ?>
        <div class="p-list">
            <a href="<?php echo url('index/video/index',['pro_id'=>$v['pro_id']]); ?>">
                <img src="<?php echo htmlentities($v['pro_thumb']); ?>" alt="">
                <p>《<?php echo htmlentities($v['pro_name']); ?>》</p>
            </a>
        </div>
        <?php endforeach; ?>
    </div>
</div>
<div class="project">
    <div class="p-title">
        <span>图书商城</span>
        <div class="p-more">
            <i class="iconfont">&#xe628;</i>
            <a href="<?php echo url('index/book/index'); ?>">更多</a>
        </div>
    </div>
    <div class="p-book">
        <?php foreach($bookList as $v): ?>
        <div class="p-list">
            <a href="<?php echo url('index/book/buy',['book_id'=>$v['book_id']]); ?>">
                <img src="<?php echo htmlentities($v['book_thumb']); ?>" alt="">
                <p>《<?php echo htmlentities($v['book_name']); ?>》</p>
            </a>
        </div>
        <?php endforeach; ?>

    </div>
</div>
<div class="project">
    <div class="p-title">
        <span>短视频专区</span>
        <div class="p-more">
            <i class="iconfont">&#xe628;</i>
            <a href="<?php echo url('index/othvideo/index'); ?>">更多</a>
        </div>
    </div>
    <div class="p-video">
        <?php foreach($othvideoList as $v): ?>
        <div class="p-list">
            <a href="<?php echo url('index/othvideo/play',['id'=>$v['othvideo_id']]); ?>">
                <img src="<?php echo htmlentities($v['othvideo_thumb']); ?>" alt="">
                <p><?php echo htmlentities($v['othvideo_name']); ?></p>
            </a>
        </div>
        <?php endforeach; ?>
    </div>
</div>
<div class="article">
    <div class="files">
        <div class="files-tit">
            <span>政治文件</span>
            <div class="p-more">
                <i class="iconfont">&#xe628;</i>
                <a href="<?php echo url('index/article/index'); ?>">更多</a>
            </div>
        </div>
        <div class="file-content">
            <ul>
                <?php foreach($zzFile as $v): ?>
                <li><i class="iconfont">&#xe606;</i><a href="<?php echo url('index/article/read',['art_id'=>$v['art_id']]); ?>"><?php echo htmlentities($v['art_name']); ?></a></li>
                <?php endforeach; ?>
            </ul>
        </div>
    </div>
    <div class="files" style="float: right">
        <div class="files-tit">
            <span>政治文件</span>
            <div class="p-more">
                <i class="iconfont">&#xe628;</i>
                <a href="<?php echo url('index/article/index'); ?>">更多</a>
            </div>
        </div>
        <div class="file-content">
            <ul>
                <?php foreach($examFile as $v): ?>
                <li><i class="iconfont">&#xe606;</i><a href="<?php echo url('index/article/read',['art_id'=>$v['art_id']]); ?>"><?php echo htmlentities($v['art_name']); ?></a></li>
                <?php endforeach; ?>
            </ul>
        </div>
    </div>
</div>
<script>
    layui.use('layer', function(){
        var layer = layui.layer;
    });
    $('#sub').click(function () {
        var phone=$("input[name='user_name']").val();
        var pwd=$("input[name='user_password']").val();
        if(phone=="" || pwd==""){
            layer.msg("请填写手机号和密码",{icon:2});
        }else {
            $.post("<?php echo url('index/login/login'); ?>",{user_name:phone,user_password:pwd},function (res) {
                if(res.code){
                    layer.msg("登陆成功",{icon:1});
                    setTimeout(function () {
                        window.location.href="<?php echo url('index/index/index'); ?>"
                    },500)
                }else {
                    layer.msg(res.msg,{icon:2});
                }
            })
        }
    })
</script>

</div>
<footer>
    <div class="copyright">
        Copyright © 2010-2020 MHK国语在线推广学习平台 All Rights Reserved<br>
        陕ICP备19016245号-1
    </div>
</footer>


<script>
    layui.use('layer', function(){
        var layer = layui.layer;
    });
    $('#layout').click(function () {
            $.post("<?php echo url('index/login/layout'); ?>","",function (res) {
                if(res.code){
                    layer.msg("退出成功",{icon:1});
                    setTimeout(function () {
                        window.location.href="<?php echo url('index/index/index'); ?>"
                    },500)
                }else {
                    layer.msg(res.msg,{icon:2});
                }
            })
    })
</script>
</body>
</html>